package com.example.lxj.judicial.service.impl;

import java.util.List;

import cn.hutool.core.date.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.lxj.judicial.mapper.TbIdentificationReportMapper;
import com.example.lxj.judicial.entity.TbIdentificationReport;
import com.example.lxj.judicial.service.ITbIdentificationReportService;

/**
 * 鉴定报告Service业务层处理
 * 
 * @author lxj
 * @date 2024-10-24
 */
@Service
public class TbIdentificationReportServiceImpl implements ITbIdentificationReportService 
{
    @Autowired
    private TbIdentificationReportMapper tbIdentificationReportMapper;

    /**
     * 查询鉴定报告
     * 
     * @param id 鉴定报告主键
     * @return 鉴定报告
     */
    @Override
    public TbIdentificationReport selectTbIdentificationReportById(Long id)
    {
        return tbIdentificationReportMapper.selectTbIdentificationReportById(id);
    }

    /**
     * 查询鉴定报告列表
     * 
     * @param tbIdentificationReport 鉴定报告
     * @return 鉴定报告
     */
    @Override
    public List<TbIdentificationReport> selectTbIdentificationReportList(TbIdentificationReport tbIdentificationReport)
    {
        return tbIdentificationReportMapper.selectTbIdentificationReportList(tbIdentificationReport);
    }

    /**
     * 新增鉴定报告
     * 
     * @param tbIdentificationReport 鉴定报告
     * @return 结果
     */
    @Override
    public int insertTbIdentificationReport(TbIdentificationReport tbIdentificationReport)
    {
        tbIdentificationReport.setCreateTime(DateUtil.date());
        return tbIdentificationReportMapper.insertTbIdentificationReport(tbIdentificationReport);
    }

    /**
     * 修改鉴定报告
     * 
     * @param tbIdentificationReport 鉴定报告
     * @return 结果
     */
    @Override
    public int updateTbIdentificationReport(TbIdentificationReport tbIdentificationReport)
    {
        tbIdentificationReport.setUpdateTime(DateUtil.date());
        return tbIdentificationReportMapper.updateTbIdentificationReport(tbIdentificationReport);
    }

    /**
     * 批量删除鉴定报告
     * 
     * @param ids 需要删除的鉴定报告主键
     * @return 结果
     */
    @Override
    public int deleteTbIdentificationReportByIds(Long[] ids)
    {
        return tbIdentificationReportMapper.deleteTbIdentificationReportByIds(ids);
    }

    /**
     * 删除鉴定报告信息
     * 
     * @param id 鉴定报告主键
     * @return 结果
     */
    @Override
    public int deleteTbIdentificationReportById(Long id)
    {
        return tbIdentificationReportMapper.deleteTbIdentificationReportById(id);
    }
}
